import React, { Component } from 'react'

export default class child1 extends Component {
    constructor(){
        super();
        this.state={
            msg:'',
            list:[1,2,3,4]
        }
    }
  render() {
    return (
      <div>
        <input ref="msgs" value={this.state.msg} onChange={(e)=>this.setState({msg:e.target.name})}/>
        <button onClick={()=>{
             this.props.setmsg=this.refs.msgs.value
        }}></button>
      </div>
    )
  }
}
